#ifndef __STEPPER_PARAM_H
#define __STEPPER_PARAM_H

#include <stdint.h>

#define STEPPER_NUM 3
#define STEPPER_X_INDEX 0U
#define STEPPER_Y_INDEX 1U
#define STEPPER_Z_INDEX 2U

typedef enum {
    subdivision_1 = 1,
    subdivision_2 = 2,
    subdivision_4 = 4,
    subdivision_8 = 8,
    subdivision_16 = 16,
    subdivision_32 =32
}subdivision_t;

/**
 * @brief  步进电机系数结构体，包括机械结构参数和驱动器设置参数
 */
typedef struct {
    /****** Machine param ******/
    float step_angle; 	/* (°) */
    float distance_round; /* (cm/r) */
    float distance_pul; /* (cm/pul) */
    /****** Driver param ******/
    subdivision_t subdivision;
}stepper_param_config_t;

extern stepper_param_config_t stp_x_param;
extern stepper_param_config_t stp_y_param;
extern stepper_param_config_t stp_z_param;

#endif